package en.edu.scau.cmi.zhanzhiyong.carpter09;

public class Example9_4 {
	public static void main(String args[]) {
		double aver = 0, sum = 0, item = 0;
		boolean computable = true;
		
		for(String s:args) {
			try {
				item = Double.parseDouble(s);
				sum += item;
			}
			catch(Exception e) {
				System.out.println(e);
				computable  = false;
			}
		}
		if(computable) {
			System.out.println("sum = " + sum);
		}
	}
}
